<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <button id="btn">点击</button>
    <div id="result"></div>
    <script src="./lib/jquery.js"></script>
    <script>
        $('#btn').click(function() {
            $.post(
                'http://www.liulongbin.top:3006/api/addbook', {
                    bookname: '好想爱这个世界啊',
                    author: '花花',
                    publisher: '自创出版社',
                },
                function(res) {
                    $('#result').html(res.msg);
                }
            );
        });
    </script>
</body>

</html>